package com.yl.flink.filter;

import com.yl.constant.Const;
import org.apache.flink.api.java.functions.KeySelector;

/**
 * @author wlf
 * @since 2022/8/26
 */
public class ProjectSelector implements KeySelector<String, String> {

    /**
     * 根据项目id分组
     */
    @Override
    public String getKey(String s) throws Exception {
        return s.split(Const.PTN_COMMA)[0];
    }
}
